package com.howtographql.hackernews.vote;

/**
 * 功能说明：
 *
 * @author xiaoyu
 * @date 2019/2/21
 */

import lombok.Data;

import java.time.ZonedDateTime;

/**
 *
 * @description
 * @version 1.0
 * @author Administrator
 * @date 2019/2/21 15:52
 *
 */
@Data
public class Vote {
    private final String id;
    private final ZonedDateTime createdAt;
    private final String userId;
    private final String linkId;

    public Vote(ZonedDateTime createdAt, String userId, String linkId) {
        this(null, createdAt, userId, linkId);
    }

    public Vote(String id, ZonedDateTime createdAt, String userId, String linkId) {
        this.id = id;
        this.createdAt = createdAt;
        this.userId = userId;
        this.linkId = linkId;
    }


}
